<?php

$nominations = app::$db->grab( 'SELECT `id`, `number`, `title` FROM `nominations` ORDER BY `number` ASC', array(), 'id' );

foreach( $nominations as $nomination_id => $nomination )
{
  $nominations[ $nomination_id ]['requests'] = app::$db->grab( 
    "SELECT `voting_number`, `voting_title`, `code` FROM `requests` WHERE `nomination_id` = ? AND `voting_title` != '' AND `voting_number` > 0 AND `status` = 'approved' ORDER BY `voting_number` ASC",
    array( $nomination_id )
    );
}

require_once HTML . 'autumn/header.php';
require_once HTML . 'autumn/cases/orgs/caves/program.php';
require_once HTML . 'autumn/footer.php';    

exit;